﻿#pragma once

#include <thread>
#include <mutex>
#include <condition_variable>
#include <QtWidgets/QWidget>
#include "ui_udpServer.h"
#include <QNetworkDatagram>
#include <QThread>
class QFile;
class QUdpSocket;
class RecvProcess;
class UdpServer : public QWidget
{
	Q_OBJECT

public:
	UdpServer(QWidget* parent = Q_NULLPTR);
	~UdpServer();

private Q_SLOTS:
	void readSocket();

private:
	inline void initUI();
	inline void initSocket();
	inline void initThread();

private:
	Ui::udpServerClass ui;
	QUdpSocket* udpSocket;
	RecvProcess* recThread;
};
